package engine.newUi
{
	import engine.data.ModelLocator;
	import engine.logic.event.LogicEvent;
	import engine.scene.SceneManager;
	import engine.tip.TipsMainLogic;
	import engine.ui.lite.BaseUI;
	
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.Event;
	
	import newx.com.config.StaticIni;
	import newx.com.control.NxClip;
	import newx.com.control.button.NxButton;
	import newx.com.control.comboBox.NxComboBox;
	import newx.com.control.group.NxViewGroup;
	import newx.com.control.text.NxLabel;
	
	
	public class ActorPropertyUI extends BaseUI
	{
		/**
		 *人物属性 名
		 */	
		/** *     public static field*   		 */		
		/**
		 *等级 
		 */		
		public static const LEVEL:String="Level";
		/**
		 * 战斗力
		 */		
		public static const FIGHT_POWER:String="FightPower";
		
		public static const TOTAL_FIGHT_POWER:String="TotalFightPower";
		/**
		 *当前 hp
		 */		
		public static const HP:String="HP";
		/**
		 *人物着装模型 
		 */		
		public static const CLOTHE_MODEL:String="ClotheModel";
		/**
		 *最大hp 
		 */		
		public static const MAX_HP:String="MaxHP";
		
		public static const MAX_HP_ADD:String="MaxHPAdd";
		
		public static const MAX_HP_MUL:String="MaxHPMul";
		
		public static const MAX_HP_MUL_ADD:String="MaxHPMulAdd";
		
		public static const MAX_HP_BONUS:String="MaxHPBonus";
		
		public static const MAX_HP_BONUS_ADD:String="MaxHPBonusAdd";
		/**
		 *人物模型 
		 */		
		public static const MODEL:String="Model";
		/**
		 *人物名 
		 */		
		public static const NAME:String="Name";
		/**
		 *声望 
		 */		
		public static const REPUTATION:String="Repute";
		
		public static const PARTNER_INVITE:String="PartnerInviteLevel";
		/**
		 *经验 
		 */		
		public static const CUR_EXP:String	=	"PlayerExp";
		/**
		 *当前最大经验 
		 */		
		public static const CUR_MAX_EXP:String	=	"PlayerUpgradeExp";
		
		public static const SKILL_ID:String	=	"DefaultUltraSkill";
		
		public static const CONFIG_ID:String	=	"ConfigID";
		
		public static const INTER_WORK:String	=	"Ing";
		public static const INTER_ADD:String	=	"IngAdd";
		/**
		 *体魄 
		 */		
		public static const STA_WORK:String	=	"Sta";
		public static const STA_ADD:String	=	"StaAdd";
		
		public static const OUT_WORK:String	=	"Str";
		public static const OUT_ADD:String	=	"StrAdd";
		public static const GANG:String	=	"ProfType";
			
		/**伙伴丹药*/
		public static const PARTNERPILL:String	=	"PartnerPillUseRec";
		
		/**主角丹药*/
		public static const PILL:String	=	"PillUseRec";
		/**
		 *家族 
		 */		
		public static const GUILD:String	=	"GuildName";
		
		public static const VIP_LEVLE:String	=	"VIPLevel";
		/**
		 *身价 
		 */		
		public static const PER_VALUE:String	=	"perValue";
		
		
		private var control:*//MyPropertyLogic=MyPropertyLogic.getInstance();
		public function get logicControl():Object
		{
			return control;
		}
		public var nameTxT:NxLabel;
		public var lvlTxT:NxLabel;
		public var fightCountTxT:NxLabel;
		public var reputationTxT:NxLabel;
		
		public var skill_lab:NxLabel;
		public var detailLab:NxLabel
		/**
		 *装备 
		 */		
		public var eq1:Sprite;
		public var eq2:Sprite;
		public var eq3:Sprite;
		public var eq4:Sprite;
		public var eq5:Sprite;
		public var eq6:Sprite;
		/**
		 *时装 
		 */		
		public var eq7:Sprite;
		public var eq8:Sprite;
		
		public var btnPanel1:Sprite
		public var btnPanel2:Sprite
		public var btnPanel3:Sprite
		public var btnPanel4:Sprite
		public var btnPanel5:Sprite
		public var btnPanel6:Sprite
		
		public var btnPanel7:Sprite;
		public var btnPanel8:Sprite;
		/**
		 *人物形象 
		 */		
		public var actorVisual:NxClip;
		
		public var photoMc		:MovieClip;
		
		/**
		 *经验条 
		 */		
		public var expBar:MovieClip;
		
		public var expTxT:NxLabel;
		
		public var lifeTxT:NxLabel;
		
		public var gangTxT:NxLabel;
		
		public var skillComb:NxComboBox;
		
		public var sta_lab:NxLabel;
		
		/**
		 *外功 
		 */		
		public var outWorkTxT:NxLabel;
		public var interWorkTxT:NxLabel;
		
		public var developBtn:NxButton;
		public var battleBtn:NxButton;
		
		/**丹药*/
		public var medicineBtn:NxButton;
		public var partnerBtn:NxButton;
		
		public var skillhead:NxLabel;
		public var btnPanel:Sprite;
		public var kungfuMc:Sprite;
		public var petMc:Sprite;
		public var xisuiMc:Sprite;
		
		/**技能切换按钮**/
		public var chengskillBtn:NxButton;
		/**时装隐藏按钮**/
		public var veilBtn:MovieClip;
		/**
		 *列表 
		 * 
		 */		
		public var actorGroup:NxViewGroup;
		public var back02:MovieClip,back01:MovieClip,back03:MovieClip,back04:MovieClip,name1:MovieClip,
		back05:MovieClip,back06:MovieClip,back07:MovieClip,back08:MovieClip,back09:MovieClip,back10:MovieClip;
		public function ActorPropertyUI(control:*,popupUI:Boolean=true)
		{
			this.control	=	control;
			super(popupUI);
		}
		override public function Init():void
		{
			skillhead.htmlStr=StaticIni.getSwfLangStr("UIString_1000148");
			detailLab.htmlStr=TipsMainLogic.instance.getUnderLineHtml(StaticIni.getSwfLangStr("UIString_1000198"),"");
			detailLab.buttonMode=true;
			medicineBtn.label=StaticIni.getSwfLangStr("IntensifyUIStr_9");
			
			developBtn.visible	=	false;
			actorVisual.buttonMode	=	true;
			
			actorVisual.addLoadedEvent(function(val:MovieClip):void{
				val.play();
			},Event.COMPLETE);
			control.Init();
			kungfuMc.buttonMode	=	true;
			petMc.buttonMode	=	true;
		}
		override protected function BeforeShow():void
		{
			if(!SceneManager._itemIconLoad)
			{
				ModelLocator.getInstance().addEventListener(LogicEvent.ITEMICONLOADED,loaded);
				function loaded():void
				{
					BeforeShow();
					ModelLocator.getInstance().removeEventListener(LogicEvent.ITEMICONLOADED,loaded)
				}
			}
			control.BeforeShow();
		}
		override protected function AfterHide():void
		{
			control.afterhide();
		}
		
	}
}